package net.mlike.openssp.server.service.impl.system;

import net.mlike.openssp.server.entity.system.User;
import net.mlike.openssp.server.repository.BaseRepository;
import net.mlike.openssp.server.repository.system.UserRepository;
import net.mlike.openssp.server.service.impl.BaseServiceImpl;
import net.mlike.openssp.server.service.system.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by wallellen@hotmail.com on 5/26/18.
 */
@Service
public class UserServiceImpl extends BaseServiceImpl<User> implements UserService {
    @Autowired
    private UserRepository userRepository;

    @Override
    public BaseRepository getRepository() {
        return userRepository;
    }

    @Override
    public User findByName(String username) {
        return userRepository.findByUsername(username);
    }
}
